Fancy layouts

You can make a multi-line field with the \\ command. It is also possible to put extra space in a field with the \vspace command. Note that if you do this you will probably have to increase the height of the header (\headheight) or of the footer (\footskip), otherwise you may get error messages ``Overfull \vbox ...has occurred while \output is active''. See Section 4.1 of the Companion for detail.

For instance, the following code will place the section title and the subsection title of an article in two lines in the upper right hand corner:

\documentclass{article}
\usepackage{fancyheadings}
\pagestyle{fancy}
\addtolength{\headheight}{\baselineskip}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}
\renewcommand{\subsectionmark}[1]{\markright{#1}}
\rhead{\leftmark\\\rightmark}

You can customize the decorative lines. You can make the decorative line in the header quite thick with

\setlength{\headrulewidth}{0.6pt}
or you can make the decorative line in the footer disappear with
\setlength{\footrulewidth}{0pt}

The decorative lines, themselves, are defined in the two macros \headrule and \footrule. For instance, if you want a dotted line rather than a solid line in the header, redefine the command \headrule:

\renewcommand{\headrule}{\vbox to 0pt{\hbox
    to\headwidth{\dotfill}\vss}}